package com.myh.cc.network

import com.myh.cc.base.CityInfo
import com.myh.cc.coom.main.bean.PlayKey
import com.myh.cc.coom.ranking.bean.RankingBean
import com.myh.cc.coom.ranking.bean.RankingDetailsBean
import com.myh.cc.coom.recommend.bean.BannerBean
import com.myh.cc.coom.recommend.bean.RecommendBean
import com.myh.cc.coom.recommend.bean.RecommendDetaislBean
import com.myh.cc.coom.search.bean.HotBean
import com.myh.cc.coom.search.bean.SearchBean
import com.myh.cc.coom.singer.bean.SingerBean
import com.myh.cc.coom.singer.bean.SingerDetailsBean
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.QueryMap

/**
 * 类描述    ： 接口地址 https://juejin.im/post/5a35228e51882506a463b172
 * 创建人    ：  mayahao.
 * 创建时间   ：  2018/1/2.
 * 修改人    ：
 * 修改时间   ：
 * 修改备注   ：
 */
interface AppService {


    @GET("weather/query")
    fun getWeather(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<CityInfo>

    /**
     * 获取 最新专辑
     */
    @GET("v8/fcg-bin/album_library")
    fun getRecommend(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<RecommendBean>

    /**
     * 获取 最新专辑 详情
     */
    @GET("v8/fcg-bin/fcg_v8_album_info_cp.fcg")
    fun getRecommendDetails(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<RecommendDetaislBean>


    /**
     * 获取 推荐 首页数据
     */
    @GET("musichall/fcgi-bin/fcg_yqqhomepagerecommend.fcg")
    fun getBanner(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<BannerBean>


    /**
     * 获取 排行榜
     */
    @GET("v8/fcg-bin/fcg_myqq_toplist.fcg")
    fun getRanking(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<RankingBean>


    /**
     * 获取 排行榜详情
     */
    @GET("v8/fcg-bin/fcg_v8_toplist_cp.fcg")
    fun getRankingDetails(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<RankingDetailsBean>


    /**
     * 获取 歌手
     */
    @GET("v8/fcg-bin/v8.fcg")
    fun getSinger(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<SingerBean>

    /**
     * 获取 歌手详情
     */
    @GET("v8/fcg-bin/fcg_v8_singer_track_cp.fcg")
    fun getSingerDetails(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<SingerDetailsBean>

    /**
     * 获取 热搜
     */
    @GET("splcloud/fcgi-bin/gethotkey.fcg")
    fun getHotSearch(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<HotBean>


    /**
     * 获取 搜索结果
     */
    @GET("soso/fcgi-bin/search_for_qq_cp")
    fun getSearch(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<SearchBean>


    /**
     * 获取 搜索结果
     */
    @GET("base/fcgi-bin/fcg_music_express_mobile3.fcg")
    fun getPlayKey(@Header("Authorization") header: String, @QueryMap map: Map<String, String>): Observable<PlayKey>

}